
json = require('json');

PingProxy = { };

function PingProxy.New(domain,sessionid)

      local proxyid = ProxyCreate(domain,29456,sessionid)
      local proxy = { _id = proxyid };
      local metatable = { __index = PingProxy.Methods };
      setmetatable(proxy,metatable);
      return proxy;
end


function PingProxy:Ping(content,callback)

      local t = { content = content };
      local jsonstring = json.encode(t);
      local messageid = 1930465604;
      ProxyCall2(self._id,messageid,jsonstring,callback);
end


PingProxy.Methods = 
    {
      Ping = PingProxy.Ping
    };